﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AiFrame.InterfaceLib.MVP
{
    /// <summary>
    /// Represents a subwindow container which contains other windows 
    /// inside of it.
    /// </summary>
    /// <typeparam name="T">Type of the data source.</typeparam>
    public interface ISubWindowContainer<T>: IDataSourceProviderProxy<T>
    {
        /// <summary>
        /// Specifies if data has been changed which need 
        /// to be saved.
        /// </summary>
        bool DataChanged { get; }

        /// <summary>
        /// Returns the identifier of the container.
        /// For example: "EDIT_CUSTOMER"
        /// </summary>
        string ID { get; }

        /// <summary>
        /// Returns the window manager.
        /// </summary>
        /// <returns></returns>
        IWindowManager<ISaveableWindow<T>> GetWindowManager();

        /// <summary>
        /// Closes all sub windows.
        /// </summary>
        void CloseSubWindows();
    }
}
